3.2 Creating Data
The process for creating encrypted data is as follows:
- Prepare the content of the plaintext data.
- Use msgpack to package the data.
- Calculate the SHA256 HASH of the packaged data.
- Generate a random number, establish a derivation index, and from it derive the encryption private key.
- Encrypt the data with the derived public key.
- Perform a Bitcoin Message signature on the encrypted data using the account's private key.
- Assemble the data script.
- Construct and broadcast the transaction.